!> 读取粒子信息
module load_pif_m

    implicit none
    private

    public :: load_pif

contains

    !> 读取 pif
    subroutine load_pif(pif_file, loc)
        character(*), intent(in) :: pif_file        !! pif 文件名
        real, intent(out), allocatable :: loc(:, :) !! 粒子位置
        integer :: itotal, i

        open (1, file=pif_file)
        read (1, *)
        read (1, *) itotal
        allocate (loc(2, itotal))
        do i = 1, itotal
            read (1, *) loc(:, i)
        end do
        close (1)
    end subroutine load_pif

end module load_pif_m

